package com.yuan.springcloud.common.exception;

/**
 * 异常常量
 * Cxxx：代表异常由客户端导致
 * Sxxx：代表异常由服务端导致
 * @author YouYuan
 * @date 2020/8/15 21:52
 */
public enum ErrorEnum {

    DEFAULT_ERR("G0001", "异常"),
    PARAMS_VALID_ERR("C0001", "参数校验不通过，请核对后重试"),
    SING_ERR("V0001", "签名验证失败"),
    TIMEOUT_ERR("S9999", "服务器开小差啦，请稍后重试"),
    RUNTIME_ERR("S0001", "不好意思出错啦X﹏X，请稍后再试~"),
    ;

    private final String errCode;
    private final String message;

    ErrorEnum(String errCode, String message) {
        this.errCode = errCode;
        this.message = message;
    }

    public String getErrCode() {
        return errCode;
    }

    public String getMessage() {
        return message;
    }
}
